package com.xbongbong.pro.statistic.result.pojo;

import com.xbongbong.paas.toolbox.wrap.QueryIgnore;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

/**
 * @author zcp
 * @version v1.0
 * @since v1.0
 */
@Getter
@Setter
@ToString
public class ChartIdPojo implements Serializable {
    private static final long serialVersionUID = -5500455221948490493L;

    /**
     * 图表id
     */
    private Long id;
    /**
     * @see com.xbongbong.pro.statistic.enums.StatisticsTypeEnum 值用该枚举的code维护
     * 指标类型：1系统指标,2自定义指标
     */
    private Integer statisticsType;

    /**
     * 图表数据源类型 0-多表 1-单表 2-数据集
     */
    private Integer single;
    /**
     * 标记千人千面请求：千人千面的需要对返回数据按照idIn的顺序封装图表
     * 对应ResultFromEnum枚举
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private String from;

    public ChartIdPojo() {
    }

    public ChartIdPojo(Long id, Integer statisticsType) {
        this.id = id;
        this.statisticsType = statisticsType;
    }

    public ChartIdPojo(Long id, Integer statisticsType, String from) {
        this.id = id;
        this.statisticsType = statisticsType;
        this.from = from;
    }
}
